package cn.com.ddapp.ddm.ui;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.util.Log;

import java.util.ArrayList;

import butterknife.BindView;
import cn.com.ddapp.ddm.R;
import cn.com.ddapp.ddm.adapter.ShareImgGalleryAdapter;
import cn.com.ddapp.ddm.base.BaseActivity;


public class ShareImgActivity extends BaseActivity {

	@BindView(R.id.picture_view_pager)
	ViewPager vp_picture;

	private ShareImgGalleryAdapter shareAdapter;
	private ArrayList<String> list;
	private int st,index;

	public static void startIntent(Context context,ArrayList<String> llist,int index){
		Intent intent=new Intent(context,ShareImgActivity.class);
		intent.putStringArrayListExtra("imgss", llist);
        intent.putExtra("index",index);
		context.startActivity(intent);
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
      list=getIntent().getStringArrayListExtra("imgss");
        index=getIntent().getIntExtra("index",0);
//		requestData(0,type);
		shareAdapter = new ShareImgGalleryAdapter(list,ShareImgActivity.this);
		vp_picture.setAdapter(shareAdapter);
        vp_picture.setCurrentItem(index);
	}

	@Override
	public void initView() {
       setTitleLeftImg(R.mipmap.back_icon);
		setTitle("");
	}

	@Override
	public void initData() {

	}

	@Override
	public int getContentViewId() {
		return R.layout.activity_gallery;
	}

	@Override
	protected String getFragmentTag() {
		return null;
	}





	private void reequestData() {

	}




}
